<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>
  <div id="app">
    <!-- <ul>
          <li v-for="item of items">
              姓名：{{item.name}}<br>
              年龄：{{item.age}}
          </li>
      </ul> -->
    <ul>
      <!-- in -->
      <!-- key是维护状态 -->
      <li v-for="(item,key,index) in user" :key="index">
        {{index}} --- {{key}} --- {{item}}---{{items.name}}
      </li>
    </ul>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data() {
        return {
          items: [
            { name: "mayuahng", age: "19" },
            { name: "alibaba", age: "111" },
            { name: "aliyeye", age: "1229" }
          ],
          user: {
            name: "aliyeye",
            age: 1999,
            email: "3945@qq.ciom"
          }
        }
      },
    });
  </script>
</body>

</html>